package com.rong.structural.adapterModel;

public class AdapterTest {
    public static void main(String[] args) {
        USB usb = new Adapter();
        usb.request();
    }
}

class USB{
    public void request(){
        System.out.println("USB数据线");
    }
}

class TypeC{
    public void SprcialRequest(){
        System.out.println("TypeC数据线");
    }
}

// 提供一个适配器继承与目标i接口适配
class Adapter extends USB{
    TypeC typeC = new TypeC();

    @Override
    public void request(){
        typeC.SprcialRequest();
    }
}


